import functools

def log(func):
    @functools.wraps(func)
    def wrapper(*args, **kw):
        print('start execute')
        ret = func(*args, **kw)
        print('end execute')
        return ret
    return wrapper


@log
def sum(a,b):
    c = a+b
    print(c)
    return c

if __name__ =="__main__":
    sum(1,2)

